package cn.wolfcode.trip.base.service;

import cn.wolfcode.trip.base.domain.Travel;
import cn.wolfcode.trip.base.domain.TravelContent;
import cn.wolfcode.trip.base.query.TravelQuery;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface ITravelService {

    List<Travel> query(TravelQuery qo);

    void saveOrUpdate(Travel travel);

    /**
     * 根据游记id查出该游记
     * @param id
     * @return
     */
    Travel selectByTravelId(Long id);

    /**
     * 跟新游记状态
     * @param travel
     */
    void updateState(Travel travel);

    /**
     * 根据游记id查询该游记文本内容
     * @param id
     * @return
     */
    TravelContent selectContentByTravelId(Long id);

    /**qiuyanquan
     * 判断用户游记是否收藏
     * @param travelId
     * @param userId
     * @return
     */
    Integer getCollectionById(Long travelId, Long userId,int type);

    void save(Long travelId, Long userId,int type);

    void delete(Long id, Long userId, int type);

    int getTravelNum(Long userId);

}
